package org.vfinal.sonidosl3tcraft;

import com.actionbarsherlock.app.SherlockFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class FragmentAdapter extends FragmentPagerAdapter {

	private String[] titles = { "Alexelcapo", "Chincheto", "Tonacho", "Otros" };
	SherlockFragment[] fragmentos;

	public FragmentAdapter(FragmentManager fm) {
		super(fm);
	}

	public CharSequence getPageTitle(int position) {

		return titles[position];
	}

	@Override
	public Fragment getItem(int position) {
		switch (position) {
		case 0:
			Alexelcapo fragmento = new Alexelcapo();
			return fragmento;

		case 1:
			Chincheto77 fragmento2 = new Chincheto77();
			return fragmento2;

		case 2:
			Tonacho fragmento3 = new Tonacho();
			return fragmento3;

		case 3:
			Otros fragmento4 = new Otros();
			return fragmento4;

		}
		return null;
	}

	@Override
	public int getCount() {

		return titles.length;
	}

}
